/*
 * Copyright 2008 Carnegie Mellon University
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, 
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package edu.cmu.lti.sepia.infra.run.model;

import java.util.Map;

import edu.cmu.lti.sepia.infra.TopicMap;

public class RunResultSet extends TopicMap<String,RunResult> {

  private static final long serialVersionUID = 1L;
  
  public RunResultSet(int initialCapacity) {
    super(initialCapacity);
  }
  
  public RunResultSet(Map<? extends String, ? extends RunResult> m) {
    super(m);
  }
  
  public QuestionAnalysisResultSet getQuestionAnalysisResultSet() {
    QuestionAnalysisResultSet map = new QuestionAnalysisResultSet(this.size());
    for ( String topicId : this.keySet() ) {
      map.put(topicId, this.get(topicId).getQuestionAnalysisResult());
    }
    return map;
  }
  
  public RetrievalResultSet getRetrievalResultSet() {
    RetrievalResultSet map = new RetrievalResultSet(this.size());
    for ( String topicId : this.keySet() ) {
      map.put(topicId, this.get(topicId).getRetrievalResult());
    }
    return map;
  }
  
  public ExtractionResultSet getExtractionResultSet() {
    ExtractionResultSet map = new ExtractionResultSet(this.size());
    for ( String topicId : this.keySet() ) {
      map.put(topicId, this.get(topicId).getExtractionResult());
    }
    return map;
  }
  
  
  public SelectionResultSet getSelectionResultSet() {
    SelectionResultSet map = new SelectionResultSet(this.size());
    for ( String topicId : this.keySet() ) {
      map.put(topicId, this.get(topicId).getSelectionResult());
    }
    return map;
  }
  
}
